import java.awt.*;

import javax.swing.*;
@SuppressWarnings("serial")
public class Lm extends JPanel{
	private Panel nextshow;
	private Label socr;
	private Label sudu;
	private Label winer=new Label();
	private Panel sd=new Panel();
	private Panel df=new Panel();
	private Panel[][] ge=new Panel[4][4];
	Lm(){
		this.setLayout(new GridLayout(4,1));
		this.setBackground(Color.darkGray);
		this.setForeground(Color.white);
		sd.setLayout(new GridLayout(2,1));
		df.setLayout(new GridLayout(2,1));
		//
		Label txt1=new Label();
		//txt1.setLocation(15,15);
		//txt1.setSize(50,20);
		txt1.setText("Next");
		Label txt2=new Label();
		//txt2.setLocation(15,125);
		//txt2.setSize(50,20);
		txt2.setText("Score");
		Label txt3=new Label();
		//txt3.setLocation(15,200);
		//txt3.setSize(50,20);
		txt3.setText("Speed");
		nextshow=new Panel();
		nextshow.setLayout(new GridLayout(4,4,1,1));
		for(int i=3;i>=0;i--)
			for(int j=0;j<4;j++)
			{
				ge[i][j]=new Panel();
				ge[i][j].setBackground(Color.darkGray);
				nextshow.add(ge[i][j],i,j);
				ge[i][j].setVisible(true);
				ge[i][j].setFocusable(false);
			}
		//
		//nextshow.setLocation(25,40);
		//nextshow.setSize(50,50);
		//
		socr=new Label();
		//socr.setLocation(0,150);
		//socr.setSize(100,10);
		socr.setAlignment(1);
		//
		sudu=new Label();
		//sudu.setLocation(0,225);
		//sudu.setSize(100,10);
		sudu.setAlignment(1);
		winer.setText("sdfs");
		this.add(txt1);
		this.add(nextshow);
		df.add(txt2);
		df.add(socr);
		this.add(df);
		sd.add(txt3);
		sd.add(sudu);
		this.add(sd);
		//this.add(winer);
		setSize(100,400);
	}
	void setSocr(String socr){
		this.socr.setText(socr);
	}
	void setSudu(String sudu){
		this.sudu.setText(sudu);
	}
	void chage(int x,int y,Color color){
		this.ge[x][y].setBackground(color);
	}
	void clean(){
		for(int i=0;i<4;i++)
			for(int j=0;j<4;j++){
				ge[i][j].setBackground(Color.darkGray);
			}
	}
	void fshow(int socr,int sudu,int next)
	{
		setSocr(String.valueOf(socr));
		setSudu(String.valueOf(sudu));
		Ge nge=new Ge(next);
		for(int i=0;i<4;i++)
			for(int j=0;j<4;j++){
				chage(i, j, Color.darkGray);
			}
		for(int i=0;i<4;i++){
			chage(nge.gezi[i].x,nge.gezi[i].y,color.se[nge.gezi[i].color]);
		}
	}
}
